@layout("/common/_curd/_container.html"){

<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";

	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});

	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["",
			"姓名",
			"所在支部",
			"用户id",
			"出生日期",
			"性别",
			"学历",
			"是否优秀党员",
			"照片",
			"备注",
			"是否缴纳党费"];
		var _colmodel = [
			{name:"id", index:"id",hidden:true, width:100},
			{name:"name", index:"name", width:100},
			{name:"dname", index:"dname", width:100},
			{name:"u_id", index:"u_id",hidden:true, width:100},
			{name:"birthday", index:"birthday", width:100},
			{name:"sex", index:"sex", width:100,formatter:function (value, row, index) {
				if(value == "0"){
					return "男";
				}else {
					return "女";
				}
			}},
			{name:"edu", index:"edu", width:100},
			{name:"isgood", index:"isgood", width:100,formatter:function (value, row, index) {
				if(value == "0"){
					return "否";
				}else {
					return "是";
				}
			}},
			{name:"img", index:"img",hidden:true, width:100},
			{name:"remarks", index:"remarks",hidden:true, width:100},

			{name:"ismoney", index:"ismoney", width:100,formatter:function (value, row, index) {
				if(value == "0"){
					return "未缴";
				}else {
					return "已缴";
				}
			}}];

		jQuery(grid_selector).jqGrid({
			url : grid_url,
			shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel,
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>


<!-- 配置 grid -->
<div class="row">
	<div class="col-xs-12 tb-grid">
		<!-- 配置 查询 -->
		@ var _col=[
		@		{name:"", index:"id", type:"text"},
		@		{name:"所在支部", index:"d_id", type:"text"},
		@		{name:"用户id", index:"u_id", type:"text"},
		@		{name:"出生日期", index:"birthday", type:"text"},
		@		{name:"性别", index:"sex", type:"text"},
		@		{name:"学历", index:"edu", type:"text"},
		@		{name:"是否优秀党员", index:"isgood", type:"text"},
		@		{name:"照片", index:"img", type:"text"},
		@		{name:"备注", index:"remarks", type:"text"},
		@		{name:"姓名", index:"name", type:"text"},
		@		{name:"是否缴纳党费", index:"ismoney", type:"text"}
		@];
		@ include("/common/_function/_search.html",{"col":_col}){}
		<!-- 按钮 -->
		<div class="welljq well-sm" id="btns"></div>
		<!-- grid -->
		<table id="grid-table"></table>
		<!-- 分页-->
		<div id="grid-pager"></div>
	</div>
</div>

<!-- 引入所需的js -->
@include("/common/_listscript.html"){}

@}	